package com.wxyzz.canteenadmin.goods.message.controller;


import com.github.pagehelper.PageInfo;
import com.wxyzz.canteenadmin.goods.goodsList.param.GoodsListDataParam;
import com.wxyzz.canteenadmin.goods.message.param.MessageDataParam;
import com.wxyzz.canteenadmin.goods.message.service.MessageService;
import com.wxyzz.canteencommon.common.PageParam;
import com.wxyzz.canteencommon.common.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/goods/message")
public class MessageController {
    @Autowired
    private MessageService messageService;
    //查询  展示所有的数据，分页，模糊查询
    @GetMapping("/pageMessage")
    public R pageGoodsList(PageParam pageParam){
        PageInfo<MessageDataParam> allMessage = messageService.findAllMessage(pageParam);
        return  R.ok(allMessage);
    }
}
